import App from './App'
import request from "@/utils/request.js";
import * as api from "@/api/api.js";

// main.js
import socket from 'plus-websocket'

// // #ifdef APP-PLUS
// Object.assign(uni, socket)
// // #endif

// //引入websocket文件
// import wsRequest from '@/utils/websocket.js'
// //开启websocket
// let websocket = new wsRequest("ws://124.220.157.145:11132",5000)
// //挂载到全局
// Vue.prototype.$socket = websocket

//全局过滤器
import * as publicFilters from '@/common/publicFilters'
Object.keys(publicFilters).forEach(key => {
    Vue.filter(key, publicFilters[key])
})


// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'

Vue.config.productionTip = false
Vue.prototype.$request=request;
Vue.prototype.$api=api;
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif